package com.qingke.besuper.command.impl;

import java.util.List;

import com.qingke.besuper.command.UserCommand;
import com.qingke.besuper.pojo.Answer;
import com.qingke.besuper.pojo.User;
import com.qingke.besuper.util.BeSuperConsole;

public class ListACommand extends UserCommand{

	public ListACommand(User user) {
		super(user);
	}

	@Override
	public void execute() {
		List<Answer> arrA=dao.getAllAnswer();
		BeSuperConsole.println("------answer list------");
		for(Answer a:arrA){
			BeSuperConsole.println("id:["+a.getId()+"],question id:["+a.getQuestionId()+"],answerer id:["+a.getPlayerId()+"],context:"+a.getValue());
			
		}
		BeSuperConsole.println();
	}

}
